﻿<UserControl xmlns:inputToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"  xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"  x:Class="GraphDrawer.DiseasesModels"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
	Width="780" Height="600">
	<Grid x:Name="LayoutRoot" Background="White">
		<Grid>
			<Grid.RowDefinitions>
				<RowDefinition Height="30" />
				<RowDefinition />
				<RowDefinition Height="40" />
			</Grid.RowDefinitions>

			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="5" />
				<ColumnDefinition />
				<ColumnDefinition Width="5" />
			</Grid.ColumnDefinitions>

			<Border Background="CornflowerBlue" Grid.ColumnSpan="3" Grid.RowSpan="3" />
			<TextBlock x:Name="txtTitle" Text="CARE" Grid.Column="1" Grid.Row="0"
				Foreground="Black" FontSize="20" FontWeight="bold" />

			<Border Background="White" Grid.Column="1" Grid.Row="1" CornerRadius="5">
				<Grid ShowGridLines="False">
					<Grid.RowDefinitions>
						<RowDefinition Height="35" />
						<RowDefinition />
						<RowDefinition Height="5" />
					</Grid.RowDefinitions>

					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="5" />
						<ColumnDefinition />
						<ColumnDefinition Width="5" />
					</Grid.ColumnDefinitions>

					<TextBlock TextAlignment="Center" VerticalAlignment="Center" FontSize="20"
							Grid.Row="0" Grid.ColumnSpan="3" >
						Diseases Models Management Module
					</TextBlock>
					<Line StrokeThickness="1" Stroke="Black" X1="0" X2="770" Y1="30" Y2="30"
						Grid.ColumnSpan="3" Grid.RowSpan="3" />

					<Grid ShowGridLines="False" Grid.Column="1" Grid.Row="1">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="200" />
							<ColumnDefinition Width="*" />
						</Grid.ColumnDefinitions>

						<Grid ShowGridLines="False" Grid.Column="0">
							<Grid.RowDefinitions>
								<RowDefinition Height="*" />
								<RowDefinition Height="150" />
							</Grid.RowDefinitions>

							<StackPanel HorizontalAlignment="Stretch" Orientation="Vertical"
									Margin="5,0,5,0" Grid.Row="0">
								<TextBlock>Diseases list:</TextBlock>
								<ListBox Name="Diseases" Height="320" BorderThickness="5" BorderBrush="SteelBlue"
									SelectionChanged="Diseases_SelectionChanged" />
							</StackPanel>

							<StackPanel HorizontalAlignment="Stretch" Orientation="Vertical"
									Margin="5,5,5,5" Grid.Row="1">
								<Button Name="CreateNewModel" Content="Create a new model" Height="40"
									Click="CreateNewModel_Click" />
								<Button Name="EditChosenModel" Content="Edit the chosen model" Height="40"
									Margin="0,10,0,0" Click="EditChosenModel_Click" IsEnabled="False" />
								<Button Name="RemoveChosenModel" Content="Remove the chosen model" Height="40"
									Margin="0,10,0,0" Click="RemoveChosenModel_Click" IsEnabled="False" />
							</StackPanel>
						</Grid>

						<Grid ShowGridLines="False" Grid.Column="1">
							<Grid.RowDefinitions>
								<RowDefinition Height="200" />
								<RowDefinition Height="*" />
							</Grid.RowDefinitions>

							<Border BorderBrush="Gray" BorderThickness="1" Grid.Row="0">
								<Grid ShowGridLines="False">
									<Grid.RowDefinitions>
										<RowDefinition Height="25" />
										<RowDefinition Height="175" />
									</Grid.RowDefinitions>

									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="200" />
										<ColumnDefinition Width="*" />
									</Grid.ColumnDefinitions>

									<TextBlock TextAlignment="Center" VerticalAlignment="Center" FontSize="14"
											Grid.Column="0" Grid.Row="0">
										Model description:
									</TextBlock>
									<Border BorderBrush="Black" BorderThickness="1" CornerRadius="5"
											Margin="5,5,5,5" Grid.Column="0" Grid.Row="1">
										<TextBlock Name="Description" TextAlignment="Center" TextWrapping="Wrap"
											VerticalAlignment="Center" Margin="5,5,5,5">
										</TextBlock>
									</Border>

									<TextBlock TextAlignment="Center" VerticalAlignment="Center" FontSize="14"
											Grid.Column="1" Grid.Row="0">
										Edit the model description:
									</TextBlock>
									<StackPanel HorizontalAlignment="Stretch" Orientation="Vertical"
										Margin="5,5,5,5" Grid.Column="1" Grid.Row="1">
										<TextBox Name="DescriptionEdit" TextWrapping="Wrap" Height="135"
											VerticalScrollBarVisibility="Visible" Margin="0,0,0,5">
										</TextBox>
										<Button Name="SaveDescription" Content="Save description" HorizontalAlignment="Center"
											Height="25" Width="120" Click="SaveDescription_Click" />
									</StackPanel>
								</Grid>
							</Border>

							<Border BorderBrush="Gray" BorderThickness="1" Grid.Row="1">
								<Grid ShowGridLines="False">
									<Grid.RowDefinitions>
										<RowDefinition Height="25" />
										<RowDefinition Height="*" />
									</Grid.RowDefinitions>

									<TextBlock TextAlignment="Center" VerticalAlignment="Center" FontSize="14"
											Grid.Row="0">
										Model visualization:
									</TextBlock>
									<Line StrokeThickness="2" Stroke="Gray" X1="0" X2="560" Y1="25" Y2="25" />
									<Canvas Name="rootCanvas" Width="550" Height="255" Margin="5,5,5,5" Grid.Row="1">
									</Canvas>
								</Grid>
							</Border>
						</Grid>
					</Grid>
				</Grid>
			</Border>

			<Button x:Name="exit" Content="Exit" HorizontalAlignment="Left" Grid.Column="1" Grid.Row="2"
				Width="70" Height="25" Click="exit_Click"/>

		</Grid>
	</Grid>
</UserControl>
